import http from "../index";
import { User } from "../interface";
import { PORT1 } from "../config/servicePort";
export const searchUser = ()=>{
    return http.get<User.ReqSearchForm>(PORT1 + `/user`);
};
export const addUser = (params:User.ReqAddForm)=>{
    return http.post<User.ReqAddForm>(PORT1 + '/user', params);
};
export const deleteUser = (id:number)=>{
    return http.delete(PORT1 + `/user/${id}`);
};
export const findPage = (params:User.FindPage)=>{
    return http.get(PORT1 + `/user/page`, params);
};
export const exportExcal = ()=>{
    return http.get(PORT1 + `/user/export`, {}, { responseType:"blob" });
};
export const importExcal = (params:FormData)=>{
    return http.post(PORT1 + `/user/import`, params);
};
export const getUserinfo = (id:string)=> {
    return http.get(PORT1 + `/user/info/${id}`);
};
export const modifyUserinfo = (params:FormData)=>{
    return http.post(PORT1 + `/user/batch`, params);
};

